package com.app.common;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.util.Date;

@Component
public class MyScheduledTasks {
    // 每天凌晨1点执行一次
    @Scheduled(cron = "0 0 1 * * ?")
    public void task2() {
        System.out.println("Task 2 executed at: " + new Date());
    }
}
